package com.hjl.controller;

import com.hjl.pojo.Emp;
import com.yqs.model.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author ServivE
 * @version 0.1
 * @className EmpController
 * @description
 * @date 2024/8/20 17:09
 * @since jdk17
 */
@Controller
@RequestMapping("emp")
public class EmpController {
    @Autowired
    private EmpService empService;

    @RequestMapping("all")
    public String findAll(Model model) {
        List<Emp> list = empService.queryAll();
        model.addAttribute("list", list);
        return "loginSuccessful";
    }
}
